
public class ComplexePol2 implements Complexe
{
	private double rho;
	private Angle theta;

	public ComplexePol2(double x, double y) {
		rho = Conversion.rho(x,  y);
		theta = Conversion.theta(x, y);
	}

	public ComplexePol2(double rho, Angle theta) {
		this.theta = theta;
		this.rho = rho;
	}

	@Override
	public double getX() {
		return Conversion.x(rho,  theta);
	}

	@Override
	public double getY() {
		return Conversion.y(rho,  theta);
	}

	@Override
	public double getRho() {
		return rho;
	}

	@Override
	public Angle getTheta() {
		return theta;
	}

	@Override
	public Complexe creer(double x, double y) {
		return new ComplexePol2(x, y);
	}

	@Override
	public Complexe creer(double rho, Angle theta) {
		return new ComplexePol2(rho, theta);
	}

}
